<div id="tree_list">
    <div class="modal-header">
        <span class="modal-title"><i class="fas fa-info-circle mr-1"></i>{:lang('v_belong')} {:lang('v_area')}</span>
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
    </div>
    <div class="modal-body">
        <div class="row mb-3">
            <div class="col-md-4 px-2">
                <span class="btn btn-success mb-2" id="check_close"><i class="fa fa-check-circle"></i> 确认 选择</span>
            </div>
            <form name="form_checksearch" id="form_checksearch" class="col-md-8 px-2">
                <input type="hidden" name="lang" id="lang" value="{:input('lang')}">
                <div class="input-group">
                    <input name="keyword" id="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                    <span class="input-group-append">
                        <button type="button" class="btn btn-success" onclick="javascript:tree_search('{:url('/area/index',['lang'=>$lang,'parentid'=>$rs['parentid'],'sortid'=>$rs['id'],'from'=>'citylist'])}');"><i class="fas fa-search mr-1"></i>{:lang('v_search')}</button>
                    </span>
                </div>
            </form>
        </div>
        <table class="table table-striped table-bordered table-hover">
            <tr>
                <td>ID</td>
                <td>{:lang('v_title')}</td>
            </tr>
            <form name="form_check" id="form_check">
                {volist name="list" id="rs"}
                    {php}$id = $rs['id']; $haveChild = 'no';{/php}
                    <tr id="tr_{$rs.id}" class="checkcity cursor">
                        <td>
                            <label>
                                <input type="checkbox" name="id[]" value="{$rs.id}">
                                <span class="d-invisible"> {$rs.id}</span>
                            </label>
                        </td>
                        <td id="td_{$rs.id}">
                            {tag:list name="childRs" table="area" where="parentid=$id" limit="1" order="id desc"}
                                {php}$haveChild = 'yes';{/php}
                            {/tag:list}
                            {if $haveChild eq 'yes'}
                                <a onclick="javascript:display_child({$rs.id},'{$rs.title}','area');" href="javascript:void(0);">{$rs.title}<i class="fa fa-plus-square fa-lg ml-2"></i></a>
                            {else /}
                                {$rs.title}
                            {/if}
                        </td>
                    </tr>
                {/volist}
                <tr>
                    <td colspan="3">
                        <div class="row">
                            <div class="col-md-12 mt-2">
                                <div class="float-left mr-4">{$list->render()|raw}</div><div class="float-left mt-2">{:lang('v_total')} {$lastPage} {:lang('v_page')} {$total} {:lang('v_records')}</div>
                            </div>
                        </div>
                    </td>
                </tr>
            </form>
        </table>
        {include file="public/js_area_child_citylist" /}
</div>